/**
 * 
 */
package com.aibili.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 用户关注关系表
 * 
 * @author qiuch
 * 
 */
@Entity
@Table(name = "t_user_attention")
public class UserAttention implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6734740117231616299L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", length = 11, nullable = false)
	private long id;

	@Column(name = "from_id", length = 11, nullable = false)
	private long from_id;// 关注人id

	@Column(name = "to_id", length = 11, nullable = false)
	private long to_id;// 被关注人id

	@Column(name = "relation", length = 11, nullable = false)
	private int relation;// 关系 1 关注 2 相互关注

	@Column(name = "attention_time", columnDefinition = "TIMESTAMP default CURRENT_TIMESTAMP")
	private Date attention_time;// 关注时间

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getFrom_id() {
		return from_id;
	}

	public void setFrom_id(long from_id) {
		this.from_id = from_id;
	}

	public long getTo_id() {
		return to_id;
	}

	public void setTo_id(long to_id) {
		this.to_id = to_id;
	}

	public int getRelation() {
		return relation;
	}

	public void setRelation(int relation) {
		this.relation = relation;
	}

	public Date getAttention_time() {
		return attention_time;
	}

	public void setAttention_time(Date attention_time) {
		this.attention_time = attention_time;
	}

}
